package com.woniu.config;

import org.redisson.Redisson;
import org.redisson.api.RedissonClient;
import org.redisson.config.Config;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class RedisConfig {
    //
    @Bean
    public RedissonClient getRedissonClient(){
        Config config = new Config();
        //config.setLockWatchdogTimeout();
        config.useSingleServer().setAddress("redis://192.172.0.15:6379").setKeepAlive(true);
        return Redisson.create(config);
    }

}
